home *** CD-ROM | disk | FTP | other *** search
/ Univers Interactif 3 / INTERACTIF.BIN / mac / Planete.net / Internet Confirmés_Vrac / JFIFBrowser.sea / JFIF Browser / cards.xml < prev    next >
Text File  |  1993-07-02  |  27KB  |  360 lines

  1. card_3875.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3875</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_4099.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2583</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3325.css" />
  13.     <part>
  14.         <id>2</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <false /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <false /> </lockText>
  23.         <rect>
  24.             <left>6</left>
  25.             <top>73</top>
  26.             <right>367</right>
  27.             <bottom>112</bottom>
  28.         </rect>
  29.         <style>scrolling</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Geneva</font>
  39.         <textSize>10</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>13</textHeight>
  42.         <name>query</name>
  43.         <script>on returnInFieldsend mouseUp to button "Run Search"end returnInFieldon mouseWithinballoon "Enter your query in this field."end mouseWithin</script>
  44.     </part>
  45.     <part>
  46.         <id>3</id>
  47.         <type>field</type>
  48.         <visible> <true /> </visible>
  49.         <dontWrap> <true /> </dontWrap>
  50.         <dontSearch> <false /> </dontSearch>
  51.         <sharedText> <false /> </sharedText>
  52.         <fixedLineHeight> <true /> </fixedLineHeight>
  53.         <autoTab> <false /> </autoTab>
  54.         <lockText> <true /> </lockText>
  55.         <rect>
  56.             <left>6</left>
  57.             <top>141</top>
  58.             <right>367</right>
  59.             <bottom>233</bottom>
  60.         </rect>
  61.         <style>scrolling</style>
  62.         <autoSelect> <false /> </autoSelect>
  63.         <showLines> <false /> </showLines>
  64.         <wideMargins> <false /> </wideMargins>
  65.         <multipleLines> <false /> </multipleLines>
  66.         <reservedFamily> 0 </reservedFamily>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>left</textAlign>
  70.         <font>Geneva</font>
  71.         <textSize>10</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <textHeight>13</textHeight>
  74.         <name>results</name>
  75.         <script>---------------------------------------------------------on mouseUp-- answer "You need to select an action such as 'View' or 'Save' "&┬¼--"before applying it to a document headline." with "OK"if the optionKey is down thensend mouseUp to card button "save"elsedisplayEntryend ifpass mouseUpend mouseUp---------------------------------------------------------on displayEntry-- select a result for viewing-- #define CT_document  0-- #define CT_byte      1-- #define CT_line      2-- #define CT_paragraph 3-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- document countglobal docCountif cd fld "results" is empty thenexit displayEntryend ifif the clickLoc is not within rect of cd field "results" thenexit displayEntryend if-- select the lineget the clicklineput it into myLineselect itput ( word 2 of myLine ) - 1 into resultDocNum-- no document headline in this rowif resultDocNum >= docCount thenanswer "Not a valid document"exit displayEntryend if-- get document headline informationput ReadQueryResult(resultDocNum) into waisErrorif waisError Γëá 0 thenanswer "An error occured while reading this document headline."┬¼with "OK"exit displayEntryend if-- display the textput displayTEXT() into waisErrorif waisError Γëá 0 thenanswer "An error occured while downloading the text."┬¼with "OK"exit displayEntryend if-- display the thumbnailput displayJFIF_TBNL() into waisErrorif waisError Γëá 0 thenanswer "An error occured while downloading the picture."┬¼with "OK"exit displayEntryend ifend displayEntry---------------------------------------------------------function displayTEXT-- download the first 100 lines (if possible) of the document and-- go to the document card-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- set up our document chunk parametersput 2 into resultChunkTypeput 0 into resultDocStartput resultDocStart + 99 into resultDocEnd-- check to see if we dont go beyond the end of the document,-- and that there are any lines, sometimes the server does-- not fill in this fieldif docLines < resultDocEnd and docLines > 0 thenput docLines into resultDocEndend if-- download the document chunkset cursor to busyput GetDoc(resultDocNum , "TEXT", resultChunkType, resultDocStart, ┬¼resultDocEnd) into waisError--put GetDocByID(docDatabaseName, docSiteName, docSiteIP, docSitePort, ┬¼--docID, docType, resultChunkType, resultDocStart, ┬¼--resultDocEnd) into waisErrorif waisError Γëá 0 thenanswer "An error occured while downloading the document."┬¼with "OK"return waisErrorend if-- put it into our document fieldput docHdl into card field "document"-- reajust our document fieldset the scroll of card field "document" to 0return 0end displayTEXT---------------------------------------------------------function displayJFIF-- download the picture display it-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- automatic or notglobal automatic-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- current document number globalglobal resultDocNum-- JFIF datatype - download it, save it and display it-- append a .jfif to the end of the file nameset the itemDelimiter to ":"put word 2 of the long name of this stack into pathNameput the length of pathName - 1 into pathNameLengthput pathNameLength - the length of the short name of this stack into pathNameLengthput character 2 to pathNameLength of pathName into pathNameput pathName & "tmp" into documentNameput documentName& ".jfif" into documentNameJFIFset cursor to busyput GetDocToFile(resultDocNum, "JFIF", documentNameJFIF, "ppxi", "JFIF")┬¼into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError Γëá 0 thenanswer "An error occured while downloading the picture."┬¼with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError Γëá 0 thenanswer "An error occured while decoding the picture."┬¼with "OK"put waisError into message boxreturn waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- Add display it as a picturepicture documentName,File,zoom,false,0set the itemDelimiter to ":"put the last item of documentName into documentNameset the globalloc of window documentName to deepestset visible of window documentName to truereturn 0end displayJFIF---------------------------------------------------------function displayJFIF_TBNL-- download the thumbnail and display it-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- automatic or notglobal automatic-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- current document number globalglobal resultDocNum-- JFIF-TBNL datatype - download it, save it and display it-- append a .jfif to the end of the file nameset the itemDelimiter to ":"put word 2 of the long name of this stack into pathNameput the length of pathName - 1 into pathNameLengthput pathNameLength - the length of the short name of this stack into pathNameLengthput character 2 to pathNameLength of pathName into pathNameput pathName & "tmp" into documentNameput documentName& ".jfif" into documentNameJFIFset cursor to busyput GetDocToFile(resultDocNum, "JFIF-TBNL", documentNameJFIF, "ppxi", "JFIF")┬¼into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError Γëá 0 thenanswer "An error occured while downloading the picture."┬¼with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError Γëá 0 thenanswer "An error occured while decoding the picture."┬¼with "OK"return waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- display the thumbnailset the itemDelimiter to ","put the rect of card button "preview" into myLocput the first item of myLoc & "," & the second item of myLoc into myLocAllClipQTPict DiffClip,the rect of card button "preview"QTPict DisplayPict,documentName,myLoc,File, clipTo, ┬¼the rect of card button "preview"if the result is not empty thenanswer the resultend if-- delete the temporary fileput HCDelFile(documentName) into waisErrorreturn 0end displayJFIF_TBNL---------------------------------------------------------on mouseWithinballoon "This field contains the document headlines returned from a "┬¼&" search. " & return & "To view or save a document, click the  "┬¼& "'view' or 'save' button, then click on the entry, alternatively "┬¼& "you may click on the document to view it, or 'option'-click to "┬¼& "save it."end mouseWithin---------------------------------------------------------</script>
  76.     </part>
  77.     <part>
  78.         <id>6</id>
  79.         <type>button</type>
  80.         <visible> <true /> </visible>
  81.         <reserved5> 0 </reserved5>
  82.         <reserved4> 0 </reserved4>
  83.         <reserved3> 0 </reserved3>
  84.         <reserved2> 0 </reserved2>
  85.         <reserved1> 0 </reserved1>
  86.         <enabled> <true /> </enabled>
  87.         <rect>
  88.             <left>298</left>
  89.             <top>55</top>
  90.             <right>359</right>
  91.             <bottom>69</bottom>
  92.         </rect>
  93.         <style>rectangle</style>
  94.         <showName> <true /> </showName>
  95.         <highlight> <false /> </highlight>
  96.         <autoHighlight> <true /> </autoHighlight>
  97.         <sharedHighlight> <true /> </sharedHighlight>
  98.         <family>0</family>
  99.         <titleWidth>0</titleWidth>
  100.         <icon>0</icon>
  101.         <textAlign>center</textAlign>
  102.         <font>Geneva</font>
  103.         <textSize>10</textSize>
  104.         <textStyle>plain</textStyle>
  105.         <name>Run Search</name>
  106.         <script>on mouseUp-- run the query-- first check to see if there are any sources selected-- then request opening the selected sources-- then submit the query-- then retrieve the results-- wais sources folderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- document headline rangeglobal docHeadlineRange-- document count global ( for current query )global docCount-- current document number globalglobal resultDocNum-- source open globalglobal sourceOpen-- open the sourceif sourceOpen Γëá 1 thenput "jfif" into databaseNameput 25 into databaseMaxDocNumput "atg.welch.jhu.edu" into siteNameput "128.220.59.22" into siteIPput "210" into sitePortput OpenWaisSource(databaseName ,databaseMaxDocNum, siteName,┬¼siteIP,sitePort) into waisError-- if the source could not be opened then give the-- user the chance to bail out otherwise we update the-- openSources globalif waisError Γëá 0 thenanswer "The source " & databaseName & " could not be opened."┬¼with "OK"exit mouseUpend ifput 1 into sourceOpenend if-- fire off our queryput card field "query" into queryTextput SubmitQuery(queryText) into waisError-- clear out the results fieldput empty into card field "results"put empty into card field "document"put empty into results-- check to see if our search could be completedif waisError Γëá 0 thenanswer "The search could not be correctly completed " with "OK"exit mouseUpend if-- get the number of documents returnedput GetDocCount() into waisErrorif waisError Γëá 0 thenanswer "Could not read the document count" with "OK"exit mouseUpend ifif docCount = 0 thenanswer "No headlines where returned" with "OK"exit mouseUpend if-- range retrieval ( 1 - true, 0 - false )-- if range is 1, we get the headlines is ranges-- otherwise we get them one at a timeput 1 into rangeif range = 0 then-- cycle through all the documents and retrieve the document-- information headline, retain the score and the headlinerepeat with i = 0 to docCount -1set cursor to busyput ReadQueryResult(i) into waisErrorif waisError Γëá 0 thenanswer "Could not read a headline, should I continue?" with "OK" or "Cancel"if it is "Cancel" thenexit mouseUpend ifend ifput results & docScore&"  "&docHeadline & return into resultsend repeatelse-- get the headline range - can get up to 50 headline in one goset cursor to busyput ReadQueryResultRange(0,docCount -1) into waisErrorif waisError Γëá 0 thenanswer "Could not read the headlines." with "OK" or "Cancel"if it is "Cancel" thenexit mouseUpend ifend ifput docHeadlineRange into resultsend if-- put the results in our results fieldput results into card field "results"end mouseUpon mouseWithinballoon "Click on this button to search the selected sources."end mouseWithin</script>
  107.     </part>
  108.     <part>
  109.         <id>23</id>
  110.         <type>field</type>
  111.         <visible> <true /> </visible>
  112.         <dontWrap> <false /> </dontWrap>
  113.         <dontSearch> <false /> </dontSearch>
  114.         <sharedText> <false /> </sharedText>
  115.         <fixedLineHeight> <false /> </fixedLineHeight>
  116.         <autoTab> <false /> </autoTab>
  117.         <lockText> <false /> </lockText>
  118.         <rect>
  119.             <left>12</left>
  120.             <top>54</top>
  121.             <right>65</right>
  122.             <bottom>71</bottom>
  123.         </rect>
  124.         <style>transparent</style>
  125.         <autoSelect> <false /> </autoSelect>
  126.         <showLines> <false /> </showLines>
  127.         <wideMargins> <false /> </wideMargins>
  128.         <multipleLines> <false /> </multipleLines>
  129.         <reservedFamily> 0 </reservedFamily>
  130.         <titleWidth>0</titleWidth>
  131.         <icon>0</icon>
  132.         <textAlign>left</textAlign>
  133.         <font>Palatino</font>
  134.         <textSize>12</textSize>
  135.         <textStyle>outline</textStyle>
  136.         <textStyle>bold</textStyle>
  137.         <textHeight>16</textHeight>
  138.         <name>query_label</name>
  139.         <script></script>
  140.     </part>
  141.     <part>
  142.         <id>25</id>
  143.         <type>field</type>
  144.         <visible> <true /> </visible>
  145.         <dontWrap> <false /> </dontWrap>
  146.         <dontSearch> <false /> </dontSearch>
  147.         <sharedText> <false /> </sharedText>
  148.         <fixedLineHeight> <false /> </fixedLineHeight>
  149.         <autoTab> <false /> </autoTab>
  150.         <lockText> <true /> </lockText>
  151.         <rect>
  152.             <left>10</left>
  153.             <top>122</top>
  154.             <right>68</right>
  155.             <bottom>139</bottom>
  156.         </rect>
  157.         <style>transparent</style>
  158.         <autoSelect> <false /> </autoSelect>
  159.         <showLines> <false /> </showLines>
  160.         <wideMargins> <false /> </wideMargins>
  161.         <multipleLines> <false /> </multipleLines>
  162.         <reservedFamily> 0 </reservedFamily>
  163.         <titleWidth>0</titleWidth>
  164.         <icon>0</icon>
  165.         <textAlign>left</textAlign>
  166.         <font>Palatino</font>
  167.         <textSize>12</textSize>
  168.         <textStyle>outline</textStyle>
  169.         <textStyle>bold</textStyle>
  170.         <textHeight>16</textHeight>
  171.         <name>results_label</name>
  172.         <script></script>
  173.     </part>
  174.     <part>
  175.         <id>26</id>
  176.         <type>field</type>
  177.         <visible> <true /> </visible>
  178.         <dontWrap> <false /> </dontWrap>
  179.         <dontSearch> <false /> </dontSearch>
  180.         <sharedText> <false /> </sharedText>
  181.         <fixedLineHeight> <false /> </fixedLineHeight>
  182.         <autoTab> <false /> </autoTab>
  183.         <lockText> <false /> </lockText>
  184.         <rect>
  185.             <left>3</left>
  186.             <top>11</top>
  187.             <right>237</right>
  188.             <bottom>45</bottom>
  189.         </rect>
  190.         <style>transparent</style>
  191.         <autoSelect> <false /> </autoSelect>
  192.         <showLines> <false /> </showLines>
  193.         <wideMargins> <false /> </wideMargins>
  194.         <multipleLines> <false /> </multipleLines>
  195.         <reservedFamily> 0 </reservedFamily>
  196.         <titleWidth>0</titleWidth>
  197.         <icon>0</icon>
  198.         <textAlign>center</textAlign>
  199.         <font>Palatino</font>
  200.         <textSize>24</textSize>
  201.         <textStyle>extend</textStyle>
  202.         <textStyle>outline</textStyle>
  203.         <textStyle>bold</textStyle>
  204.         <textHeight>32</textHeight>
  205.         <name>search_label</name>
  206.         <script></script>
  207.     </part>
  208.     <part>
  209.         <id>37</id>
  210.         <type>button</type>
  211.         <visible> <true /> </visible>
  212.         <reserved5> 0 </reserved5>
  213.         <reserved4> 0 </reserved4>
  214.         <reserved3> 0 </reserved3>
  215.         <reserved2> 0 </reserved2>
  216.         <reserved1> 0 </reserved1>
  217.         <enabled> <true /> </enabled>
  218.         <rect>
  219.             <left>310</left>
  220.             <top>123</top>
  221.             <right>361</right>
  222.             <bottom>137</bottom>
  223.         </rect>
  224.         <style>rectangle</style>
  225.         <showName> <true /> </showName>
  226.         <highlight> <false /> </highlight>
  227.         <autoHighlight> <false /> </autoHighlight>
  228.         <sharedHighlight> <true /> </sharedHighlight>
  229.         <family>0</family>
  230.         <titleWidth>0</titleWidth>
  231.         <icon>0</icon>
  232.         <textAlign>center</textAlign>
  233.         <font>Geneva</font>
  234.         <textSize>10</textSize>
  235.         <textStyle>plain</textStyle>
  236.         <name>Download</name>
  237.         <script>---------------------------------------------------------on mouseUp-- select a result for saving-- #define CT_document  0-- #define CT_byte      1-- #define CT_line      2-- #define CT_paragraph 3-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- document countglobal docCount-- see if we are displaying a documentif card field "results" is empty or card field "document" is empty thenexit mouseUpend ifput ( word 2 of the clickLine ) - 1 into resultDocNum-- no document headline in this rowif resultDocNum >= docCount thenanswer "Not a valid document"exit mouseUpend if-- get document headline informationput ReadQueryResult(resultDocNum) into waisErrorif waisError Γëá 0 thenanswer "An error occured while reading this document headline."┬¼with "OK"exit mouseUpend if-- if there is more than one document type put up the list pickerput the number of lines of docType into docTypeNumif docTypeNum > 1 thenput "Text" & return & "Picture" & return & "Thumbnail Picture" ┬¼into docTypeListput niceFileName(docHeadline) into documentNameget showList(docTypeList,"Choose the kind of document you want to save:" ┬¼& return & "(" &documentName & ")" ,┬¼false,false,"Select,Cancel",1)-- if the user cancelled, we exitif line 1 of it = "Cancel" thenexit mouseUpend if-- extract the selected document typeput line 2 of it into docTypeNumput line docTypeNum of docTypeList into docTypeListif docTypeList = "Text" thenput "TEXT" into docTypeelse if docTypeList = "Picture" thenput "JFIF" into docTypeelse if docTypeList = "Thumbnail Picture" thenput "JFIF-TBNL" into docTypeend ifend if-- download the documentif docType = "TEXT" thenput downloadTEXT() into waisErrorexit mouseUpelse if docType = "JFIF" thenput downloadJFIF() into waisErrorexit mouseUpelse if docType = "JFIF-TBNL" thenput downloadJFIF() into waisErrorexit mouseUpend ifend mouseUp---------------------------------------------------------function downloadTEXT-- prompt the user for a file name and download the document to that-- file-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- ask for the file name to save the document intoput niceFileName(docHeadline) into documentNameask file "Save Document:" with documentNameput it into documentName-- check if user canceled the operationif documentName is empty thenreturn waisErrorend if-- download thew documentset cursor to busyput GetDocToFile(resultDocNum, docType, documentName, "????", "TEXT")┬¼into waisErrorif waisError Γëá 0 thenanswer "An error occured while downloading the document."┬¼with "OK"return waisErrorend ifend downloadTEXT---------------------------------------------------------function downloadJFIF-- prompt the user for a file name and download the picture to that-- file-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- ask for the file name to save the document intoput niceFileName(docHeadline) & " picture" into documentNameask file "Save JFIF Document:" with documentNameput it into documentName-- check if user canceled the operationif documentName is empty thenreturn waisErrorend if-- append a .bin to the end of the file nameput documentName & ".jfif" into documentNameJFIF-- download thew documentset cursor to busyput GetDocToFile(resultDocNum, docType, documentNameJFIF, "????", "TEXT")┬¼into waisErrorif waisError Γëá 0 thenanswer "An error occured while downloading the picture."┬¼with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError Γëá 0 thenanswer "An error occured while decoding the picture."┬¼with "OK"put waisError into message boxreturn waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- ask the user if he/she wants to see the picture nowanswer "Do you want to look at it now?" with "No" or "Yes"if it = "Yes" then-- display it as a picturepicture documentName,File,zoom,false,0set the itemDelimiter to ":"put the last item of documentName into documentNameset the globalloc of window documentName to deepestset visible of window documentName to trueend ifend downloadJFIF---------------------------------------------------------on mouseWithinballoon "Click on this button to save a document in the "┬¼& "results list." & return & "To save an document, click on this "┬¼& "button, then click on the headline in the results list."end mouseWithin---------------------------------------------------------</script>
  238.     </part>
  239.     <part>
  240.         <id>45</id>
  241.         <type>button</type>
  242.         <visible> <true /> </visible>
  243.         <reserved5> 0 </reserved5>
  244.         <reserved4> 0 </reserved4>
  245.         <reserved3> 0 </reserved3>
  246.         <reserved2> 0 </reserved2>
  247.         <reserved1> 0 </reserved1>
  248.         <enabled> <true /> </enabled>
  249.         <rect>
  250.             <left>383</left>
  251.             <top>52</top>
  252.             <right>625</right>
  253.             <bottom>228</bottom>
  254.         </rect>
  255.         <style>transparent</style>
  256.         <showName> <false /> </showName>
  257.         <highlight> <false /> </highlight>
  258.         <autoHighlight> <false /> </autoHighlight>
  259.         <sharedHighlight> <true /> </sharedHighlight>
  260.         <family>0</family>
  261.         <titleWidth>0</titleWidth>
  262.         <icon>0</icon>
  263.         <textAlign>center</textAlign>
  264.         <font>Chicago</font>
  265.         <textSize>12</textSize>
  266.         <textStyle>plain</textStyle>
  267.         <name>preview</name>
  268.         <script></script>
  269.     </part>
  270.     <part>
  271.         <id>47</id>
  272.         <type>field</type>
  273.         <visible> <true /> </visible>
  274.         <dontWrap> <false /> </dontWrap>
  275.         <dontSearch> <false /> </dontSearch>
  276.         <sharedText> <false /> </sharedText>
  277.         <fixedLineHeight> <false /> </fixedLineHeight>
  278.         <autoTab> <false /> </autoTab>
  279.         <lockText> <true /> </lockText>
  280.         <rect>
  281.             <left>7</left>
  282.             <top>261</top>
  283.             <right>630</right>
  284.             <bottom>441</bottom>
  285.         </rect>
  286.         <style>scrolling</style>
  287.         <autoSelect> <false /> </autoSelect>
  288.         <showLines> <false /> </showLines>
  289.         <wideMargins> <false /> </wideMargins>
  290.         <multipleLines> <false /> </multipleLines>
  291.         <reservedFamily> 0 </reservedFamily>
  292.         <titleWidth>0</titleWidth>
  293.         <icon>0</icon>
  294.         <textAlign>left</textAlign>
  295.         <font>Geneva</font>
  296.         <textSize>10</textSize>
  297.         <textStyle>plain</textStyle>
  298.         <textHeight>13</textHeight>
  299.         <name>document</name>
  300.         <script>on keyDownanswer "You may not modify this text"end keyDownon mouseWithinballoon "This field contains the document section. "end mouseWithin</script>
  301.     </part>
  302.     <part>
  303.         <id>48</id>
  304.         <type>field</type>
  305.         <visible> <true /> </visible>
  306.         <dontWrap> <false /> </dontWrap>
  307.         <dontSearch> <false /> </dontSearch>
  308.         <sharedText> <false /> </sharedText>
  309.         <fixedLineHeight> <false /> </fixedLineHeight>
  310.         <autoTab> <false /> </autoTab>
  311.         <lockText> <true /> </lockText>
  312.         <rect>
  313.             <left>9</left>
  314.             <top>241</top>
  315.             <right>98</right>
  316.             <bottom>260</bottom>
  317.         </rect>
  318.         <style>transparent</style>
  319.         <autoSelect> <false /> </autoSelect>
  320.         <showLines> <false /> </showLines>
  321.         <wideMargins> <false /> </wideMargins>
  322.         <multipleLines> <false /> </multipleLines>
  323.         <reservedFamily> 0 </reservedFamily>
  324.         <titleWidth>0</titleWidth>
  325.         <icon>0</icon>
  326.         <textAlign>left</textAlign>
  327.         <font>Palatino</font>
  328.         <textSize>12</textSize>
  329.         <textStyle>outline</textStyle>
  330.         <textStyle>bold</textStyle>
  331.         <textHeight>16</textHeight>
  332.         <name>document_label</name>
  333.         <script></script>
  334.     </part>
  335.     <content>
  336.         <layer>card</layer>
  337.         <id>23</id>
  338.         <text>Query</text>
  339.     </content>
  340.     <content>
  341.         <layer>card</layer>
  342.         <id>25</id>
  343.         <text>Results</text>
  344.     </content>
  345.     <content>
  346.         <layer>card</layer>
  347.         <id>26</id>
  348.         <text>Image Browser</text>
  349.     </content>
  350.     <content>
  351.         <layer>card</layer>
  352.         <id>48</id>
  353.         <text>Document</text>
  354.     </content>
  355.     <name>query</name>
  356.     <script>on initializeCardput empty into card field "query" of card "query"put empty into card field "results" of card "query"put empty into card field "document" of card "query"end initializeCard</script>
  357. </card>
  358.  
  359.  
  360.